package bus;

import java.io.Serializable;
import java.util.List;
import java.util.ListIterator;

public class ProductManager implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private List products;

	public List getProducts() {
		return products;
	}

	public void setProducts(List products) {
		this.products = products;
	}
	
	public void increasePrice( int pct )
	{
		ListIterator iter = products.listIterator();
		while ( iter.hasNext() )
		{
			Product p = (Product) iter.next();
			double newPrice = p.getPrice().doubleValue() * ( 100 + pct )/100;
			p.setPrice( new Double( newPrice ) );
		}
	}
}
